* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(52, 152, 219, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(52, 152, 219, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(52, 152, 219, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(52, 152, 219, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    z-index: -1;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

nav {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background-color: #3498db;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    overflow: hidden;
}

button:hover {
    background-color: #2980b9;
}

button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

button:hover::after {
    width: 200px;
    height: 200px;
}

.section {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

input[type="text"],
input[type="number"],
input[type="date"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* 模板卡片样式 */
.template-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.template-header {
    background-color: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.template-header h3 {
    margin: 0;
    color: #2c3e50;
}

.template-fields {
    padding: 15px;
}

.field-display {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px;
    border-bottom: 1px solid #eee;
    background-color: #fff;
    border-radius: 4px;
    margin-bottom: 8px;
}

.field-display:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.field-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.field-name {
    font-weight: bold;
    min-width: 150px;
}

.field-type {
    color: #666;
    background-color: #f1f1f1;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 14px;
}

.field-options {
    margin-top: 8px;
    padding: 8px;
    background-color: #f8f9fa;
    border-radius: 4px;
    font-size: 14px;
    color: #666;
}

.field-options-title {
    font-weight: 500;
    margin-bottom: 5px;
    color: #2c3e50;
}

.field-options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.field-option-item {
    background-color: #e8f4f8;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: #2980b9;
}

.template-footer {
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-top: 1px solid #ddd;
    font-size: 14px;
    color: #666;
}

/* 字段编辑样式 */
#fieldsContainer {
    margin: 20px 0;
}

.field-item {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.field-item > div:not(.options-container) {
    display: flex;
    gap: 10px;
    align-items: center;
}

.field-item input {
    flex: 1;
}

.field-item select {
    width: 150px;
}

.options-container {
    margin-top: 10px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.options-container.hidden {
    display: none;
}

.options-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.options-hint {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.options-example {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    white-space: pre-line;
    color: #666;
    font-size: 0.9rem;
}

.options-textarea {
    width: 100%;
    min-height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    resize: vertical;
}

.add-option-btn {
    align-self: flex-end;
    background-color: #3498db;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-option-btn:hover {
    background-color: #2980b9;
}

.options-list {
    margin-top: 15px;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.option-label {
    font-weight: 500;
    color: #333;
}

.option-value {
    font-size: 0.9rem;
    color: #666;
}

.remove-option-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    margin-left: 8px;
}

.remove-option-btn:hover {
    color: #c82333;
}

/* 信息录入页面样式 */
#dataEntry {
    max-width: 800px;
    margin: 0 auto;
}

#dataEntryForm {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#dataEntryForm .form-group {
    margin-bottom: 20px;
}

#dataEntryForm label {
    font-weight: bold;
    margin-bottom: 8px;
}

/* 图片上传样式 */
.image-upload-container {
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.image-upload-container:hover {
    border-color: #3498db;
    background-color: #f8f9fa;
}

.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border-radius: 4px;
}

/* 数据查看样式 */
#dataViewContainer {
    margin: 20px 0;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
}

#pageInfo {
    font-size: 14px;
    color: #666;
}

/* 下拉框选项样式 */
.options-input-container {
    margin-bottom: 1rem;
}

.options-hint {
    margin-bottom: 0.5rem;
    color: #666;
    font-size: 0.9rem;
}

.options-example {
    background-color: #f5f5f5;
    padding: 0.5rem;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-family: monospace;
    white-space: pre-line;
    color: #666;
}

.options-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    font-family: monospace;
    resize: vertical;
}

.options-list {
    margin-top: 1rem;
}

.option-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.option-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.option-label {
    font-weight: 500;
    color: #333;
}

.option-value {
    font-size: 0.9rem;
    color: #666;
}

.remove-option-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
}

.remove-option-btn:hover {
    color: #c82333;
}

.options-format {
    margin-top: 10px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.options-format small {
    display: block;
    margin-bottom: 5px;
    color: #666;
}

.options-format pre {
    margin: 0;
    padding: 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    white-space: pre-wrap;
}

/* 左侧菜单样式 */
.sidebar {
    width: 200px;
    position: sticky;
    top: 20px;
    height: fit-content;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar button {
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    border-radius: 4px;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.sidebar button:hover {
    background-color: #2980b9;
    transform: translateX(5px);
}

.sidebar button.active {
    background-color: #2980b9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* 主内容区域样式 */
.main-content {
    flex: 1;
    min-width: 0;
}

/* 更新选项输入区域样式 */
.options-textarea {
    width: 100%;
    min-height: 100px;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: static;
        margin-bottom: 20px;
    }

    .sidebar nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .sidebar button {
        flex: 1;
        min-width: 150px;
    }

    .field-item {
        flex-direction: column;
    }

    .field-item select {
        width: 100%;
    }

    .options-container {
        flex-direction: column;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }

    .template-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .field-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* 添加科技感背景 */
body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f5f5;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(45deg, rgba(52, 152, 219, 0.1) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(52, 152, 219, 0.1) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(52, 152, 219, 0.1) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(52, 152, 219, 0.1) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    z-index: -1;
}

/* 添加动态背景元素 */
.tech-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
}

.tech-bg::before,
.tech-bg::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s infinite linear;
}

.tech-bg::before {
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.tech-bg::after {
    bottom: 10%;
    right: 10%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    50% {
        transform: translate(100px, 100px) rotate(180deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.dashboard-card {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.card-value {
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.chart-container {
    height: 300px;
    width: 100%;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 250px;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.template-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.data-entry-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.primary-btn {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.secondary-btn {
    background-color: #95a5a6;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.secondary-btn:hover {
    background-color: #7f8c8d;
}

.template-select-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.format-select-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.download-options {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
} 